import Vue from 'vue'
import Router from 'vue-router'
import home from 'components/home/home'
import search from 'components/search/search'
import location from 'components/location/location'
import mine from 'components/mine/mine'
import hotelInfo from 'components/hotelInfo/hotelInfo'
import city from 'components/city/city'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: 'home'
    },
    {
      path: '/home',
      component: home
    },
    {
      path: '/location',
      component: location
    }, {
      path: '/search',
      component: search
    }, {
      path: '/mine',
      component: mine
    }, {
      path: '/hotelInfo',
      component: hotelInfo
    },
    {
      path: '/city',
      component: city
    }, {
      path: '*', // 页面不存在的情况下会跳到404页面
      component: () => import('components/notFound/notFound')
    }
  ]
})
